﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace System.Windows.BidiControls
{
    [TemplateVisualState(Name="MouseOver", GroupName="CommonStates"), TemplateVisualState(Name="Unfocused", GroupName="FocusStates"), TemplateVisualState(Name="Focused", GroupName="FocusStates"), TemplateVisualState(Name="Disabled", GroupName="CommonStates"), TemplateVisualState(Name="Normal", GroupName="CommonStates"), TemplateVisualState(Name="Pressed", GroupName="CommonStates")]
    public class HyperlinkButton : System.Windows.Controls.HyperlinkButton
    {
        private const string _dataTemplate = "<DataTemplate xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:local=\"clr-namespace:System.Windows.BidiControls;assembly=BidiControls\" >" +
                                             "<Grid>" +
                                             "<local:ContentControl Content=\"{TemplateBinding Content}\" FlowDirection=\"RightToLeft\" HorizontalAlignment=\"Center\" VerticalAlignment=\"Center\"/>" +
                                             "</Grid>" +
                                             "</DataTemplate>";
        public HyperlinkButton()
        {
            DefaultStyleKey = this.GetType();
            FontFamily = new FontFamily("Arial");
            //ContentTemplate = XamlReader.Load(_dataTemplate) as DataTemplate;
        }
    }
}
